package krow.dev.gunpobus.view.dialog;

import krow.dev.gunpobus.R;
import krow.dev.gunpobus.util.AnimationUtil;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

public class LoadDialog extends Dialog{

	
	public LoadDialog(Context context) {
		super(context);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
		getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
		
		setContentView(R.layout.dialog_load);

		View innerView = findViewById(R.id.view_progress_inner);
		innerView.startAnimation(AnimationUtil.createRotateAnimation(context, 720, 0));
		
		View outerView = findViewById(R.id.view_progress_outer);
		outerView.startAnimation(AnimationUtil.createRotateAnimation(context, 0, 1080));
	}

	@Override
	public void dismiss() {
		super.dismiss();
	}

	@Override
	public void show() {
		super.show();
	}
}
